//
//  CBTableViewDataSourceMaker.h
//  CedarFinancePH
//
//  Created by lshenrong on 2018/3/20.
//  Copyright © 2018年 cedarhd. All rights reserved.
//

#import <Foundation/Foundation.h>
@class CedarTableViewSectionMaker;

@interface CedarTableViewDataSourceMaker : NSObject

- (void)makeSection:(void (^)(CedarTableViewSectionMaker * section))block;

@property(nonatomic, weak) UITableView * tableView;
@property(nonatomic, strong) NSMutableArray * sections;

- (instancetype)initWithTableView:(UITableView *)tableView;
- (CedarTableViewDataSourceMaker * (^)(CGFloat))height;
- (CedarTableViewDataSourceMaker * (^)(UIView * (^)(void)))headerView;
- (CedarTableViewDataSourceMaker * (^)(UIView * (^)(void)))footerView;

- (void)commitEditing:(void(^)(UITableView * tableView,UITableViewCellEditingStyle * editingStyle,NSIndexPath * indexPath))block;
- (void)scrollViewDidScroll:(void(^)(UIScrollView *scrollView))block;

@property(nonatomic, copy) void(^commitEditingBlock)(UITableView * tableView,UITableViewCellEditingStyle * editingStyle,NSIndexPath * indexPath);
@property(nonatomic, copy) void(^scrollViewDidScrollBlock)(UIScrollView *scrollView);

@end
